<html th:fragment="content" xmlns:th="http://www.w3.org/1999/xhtml">
<template id="content">
    <div>
        <p-card>
            <p slot="title">
                更新部署
            </p>
            <p-form ref="formValidate" :model="formValidate" :label-width="90">
                <p-row>
                    <p-col span="8">
                        <p-form-item label="应用名称" prop="appName">
                            <p-input v-model="deployVo.nickname" readonly placeholder="应用名称"></p-input>
                        </p-form-item>
                    </p-col>
                </p-row>

                <p-row>
                    <p-col span="8">
                        <p-form-item label="Git地址" prop="gitUrl">
                            <p-input v-model="deployVo.gitUrl" placeholder="请输入Git地址"></p-input>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row>
                    <p-col span="8">
                        <p-form-item label="分支" prop="branchName">
                            <p-input v-model="deployVo.branchName" placeholder="请输入分支"></p-input>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row>
                    <p-col span="8">
                        <p-form-item label="编译参数" prop="params">
                            <p-input v-model="deployVo.params" placeholder="请输入编译参数"></p-input>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row>
                    <p-col span="8">
                        <p-form-item label="生产分组" prop="prodGroupView">
                            <p-switch size="large" :value="prodGroupView" @on-change="prodGroupViewChange">
                                <span slot="open">开启</span>
                                <span slot="close">关闭</span>
                            </p-switch>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row>
                    <p-col span="8">
                        <p-form-item label="分组" prop="appName">
                            <p-select v-model="groupViewList" multiple placeholder="请选择分组">
                                <p-option-group label="预发分组">
                                    <p-option v-for="item in groupPreList" :value="item.value" :key="item.value">{{
                                        item.label
                                        }}
                                    </p-option>
                                </p-option-group>
                                <p-option-group label="生产分组">
                                    <p-option v-for="item in groupProdList" :value="item.value" :key="item.value">{{
                                        item.label
                                        }}
                                    </p-option>
                                </p-option-group>
                            </p-select>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row>
                    <p-col span="8">
                        <p-form-item label="是否构建编译" prop="prodGroupView">
                            <p-switch size="large" :value="imgView" @on-change="imgViewChange">
                                <span slot="open">是</span>
                                <span slot="close">否</span>
                            </p-switch>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row v-if="imgViewListView">
                    <p-col span="8">
                        <p-form-item label="镜像" prop="appName">
                            <p-select v-model="deployVo.imgTag" placeholder="请选择镜像">
                                <p-option v-for="item in imgViewList" :value="item.value" :key="item.value">{{
                                    item.label
                                    }}
                                </p-option>
                            </p-select>
                        </p-form-item>
                    </p-col>
                </p-row>
                <p-row>
                    <p-col span="12">
                        <p-form-item>
                            <p-button type="primary" @click="handleSubmit" :loading="loading">更新</p-button>
                        </p-form-item>
                    </p-col>
                </p-row>
            </p-form>
        </p-card>
    </div>
</template>
<script type="text/javascript" src="/js/content-component.js"></script>
</html>
